#include <stdio.h>
// 深圳8月份近期气温:31.1℃,34.2℃,37.3℃,35.4℃,36.8℃,39.1℃,28.7℃,29.5℃ 求近期的平均气温
int main()
{
  double temp[] = {31.1, 34.2, 37.3, 35.4, 36.8, 39.1, 28.7, 29.5},sum;
  int all_length = sizeof(temp);
  int single_length = sizeof(temp[0]);
  int length = all_length / single_length;
  for (int i = 0; i < length; i++){
    sum+=temp[i];
  }
  printf("近期的平均气温:%.2lf",sum/length);
    return 0;
}